<template>
  <j-select-biz-component :width="1300"  :query-config="selectTeacherQueryConfig" v-bind="configs" v-on="$listeners"/>
</template>

<script>
  import JSelectBizComponent from '@/components/jeecgbiz/JSelectBizComponent'

  export default {
    name: 'JSelectTeacher',
    components: { JSelectBizComponent },
    props: ['value'],
    data() {
      return {
        selectTeacherQueryConfig: [
           {key: 'lastName', label: 'Last Name'},
        ],
        settings: {
          multiple:false,
          name: 'Teacher',
          displayKey: 'name',
          showMoreQueryItems:true,
          returnKeys: ['id','name','firstName','lastName'],
          listUrl: '/sistersophie/teacherInfo/list',
          queryParamCode: 'firstName',
          queryParamText: 'First Name',
          columns: [
            { title: 'ID', dataIndex: 'id', align: 'center', width: '32%' },
            { title: 'First Name', dataIndex: 'firstName', align: 'center', width: '32%' },
            { title: 'Last Name', dataIndex: 'lastName', align: 'center', width: '32%' }
          ],
        }
      }
    },
    computed: {
      configs() {
        return Object.assign({ value: this.value }, this.settings, this.$attrs)
      }
    }
  }
</script>

<style lang="less" scoped></style>